package com.zheng.study.base.bean.search.result;

import com.zheng.study.base.bean.search.Search;

/**
 * 查询 - 结果 - SearchResult
 * ============================================================================
 * author : fallenpanda
 * createDate:  2018/6/12 。
 * ============================================================================
 */
public abstract class SearchResult {

	protected final Search search;

	public SearchResult(Search search) {
		this.search = search;
	}

	public abstract static class Builder<T extends SearchResult, B extends Builder<T, B>>{

		private B theBuilder;

		protected Search search;

		protected Builder(){
			theBuilder = getThis();
		}

		protected abstract B getThis();

		public B setSearch(Search search) {
			this.search = search;
			return theBuilder;
		}

		public abstract T build();
	}

}
